package com.example.zhihuhelpapp.utils;

import android.util.Log;

public class LogUtils {
    private static String TAG = "aijie";
    private static boolean isShowLog = false;

    public static void i(String content) {
        Log.i(TAG, content);
    }

    public static void e(String content) {
        Log.e(TAG, content);
    }

    /**
     * 打印长日志的方法(分次打印)
     */
    public static void logL(String content) {
            int p = 2000;
            long length = content.length();
            if (length < p || length == p) {
                i(content);
            } else {
                while (content.length() > p) {
                    String logContent = content.substring(0, p);
                    content = content.replace(logContent, "");
                    i(logContent);
                }
                i(content);
            }
    }
}
